<%@ page import="sige.Diretor" %>
<!doctype html>
<html>
	<head>
		<meta name="layout" content="main">
		<g:set var="entityName" value="${message(code: 'diretor.label', default: 'Diretor')}" />
		<title><g:message code="default.edit.label" args="[entityName]" /></title>
	</head>
	<body>
        <center>
            <h1><g:message code="default.edit.label" args="[entityName]" /></h1>
        </center>
        <ul class="breadcrumb">
            <li>
                <a href="${createLink(uri: '/')}">
                  <i class="icon-home"></i>
                  <g:message code="default.home.label"/>
                </a>
                <span class="divider"><g:message code="span.divider" /></span>
            </li>
            <li>
                <g:link action="list">
                    <i class="icon-list"></i>
                    <g:message code="default.list.label" args="[entityName]" />
                </g:link>
                <span class="divider"><g:message code="span.divider" /></span>
            </li>
            <li>
                <g:link action="create">
                    <i class="icon-file"></i>
                    <g:message code="default.new.label" args="[entityName]" />
                </g:link>
            </li>
			</ul>
		</div>
		<div id="edit-diretor" class="content scaffold-edit" role="main">
			<g:if test="${flash.message}">
				<div class="alert alert-info">
				<button type="button" class="close" data-dismiss="alert">&times;</button>
                ${flash.message}
            </div>
            </g:if>
			<g:hasErrors bean="${diretorInstance}">
			<ul class="alert alert-error">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                <g:eachError bean="${diretorInstance}" var="error">
                    <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                </g:eachError>
            </ul>
			</g:hasErrors>
			
			<div class="span3">
			
            </div>
            <g:form method="post" class="span6">
                <g:hiddenField name="id" value="${diretorInstance?.id}" />
                <g:hiddenField name="version" value="${diretorInstance?.version}" />
                <fieldset class="form-horizontal well">
                        <g:render template="form"/>
                </fieldset>
                <fieldset class="form-actions">
                    <g:actionSubmit class="btn btn-primary" action="update" value="${message(code: 'default.button.update.label', default: 'Update')}" />
                    <a data-toggle="modal" href="#myModal" class="btn btn-danger">
                        <i class="icon-trash icon-white"></i>
                        <g:message code="default.button.delete.label" default="Delete" /> 
                    </a>
                    <!--------MODAL----------->
                    <div class="modal hide fade in" id="myModal">
                        <div class="modal-header">
                            <a class="close" data-dismiss="modal">×</a>
                            <h3><g:message code="default.button.delete.atention.message" default="Attention!" /></h3>
                        </div>
                        <div class="modal-body">
                            <p><g:message code="default.button.delete.confirm.message" default="Are you sure?" /> </p>
                        </div>
                        <div class="modal-footer">
                            <g:actionSubmit class="btn btn-danger" action="delete" value="${message(code: 'default.button.delete.label', default: 'Delete')}" />
                        </div>
                    </div>
                </fieldset>
            </g:form>
        </div>
    </body>
</html>
